package com.ouc.yyi.springbootwebapp.controller;

import com.ouc.yyi.springbootwebapp.bo.UserBo;
import com.ouc.yyi.springbootwebapp.service.UserInfoService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserInfoController {
    private static final Log logger = LogFactory.getLog(UserInfoController.class);
    @Autowired
    private UserInfoService userInfoService;

    @GetMapping("/get/{id}")
    public UserBo getUser(@PathVariable("id") String id) {
        logger.info("请求到的参数为：" + id);
        return userInfoService.getUserInfoById(id);
    }

}
